# A simple debug script showing the locations of imported target.
# There is no load-bearing functionality.
function(ListImportedTargets dir)
    message(DEBUG "List of imported targets in ${dir}:")
    get_property(tgts DIRECTORY ${dir} PROPERTY IMPORTED_TARGETS)
    foreach(tgt ${tgts})
        message(DEBUG "  ${tgt}")
        get_property(p TARGET ${tgt} PROPERTY IMPORTED_LOCATION)
        message(DEBUG "    IMPORTED_LOCATION=${p}")
        get_property(p TARGET ${tgt} PROPERTY IMPORTED_LIBNAME)
        message(DEBUG "    IMPORTED_LIBNAME=${p}")
        foreach(cfg in DEBUG;RELEASE)
            set(VAR "IMPORTED_LOCATION_${cfg}")
            get_property(p TARGET ${tgt} PROPERTY ${VAR})
            message(DEBUG "    ${VAR}=${p}")
            set(VAR "IMPORTED_LIBNAME_${cfg}")
            get_property(p TARGET ${tgt} PROPERTY ${VAR})
            message(DEBUG "    ${VAR}=${p}")
        endforeach()
    endforeach()
endfunction()
